package com.yanqu.road.server.manager.config;

import com.yanqu.road.entity.config.beauty.BeautyInfo;
import com.yanqu.road.logic.bussiness.config.BeautyBussiness;
import com.yanqu.road.server.TempMgr;

import java.util.Map;

public class BeautyMgr extends TempMgr {

    private static Map<Integer, BeautyInfo> beautyInfoMap;

    @Override
    public boolean init() throws Exception {
        return reload();
    }

    @Override
    public boolean reloadConfig() throws Exception {
        return true;
    }

    @Override
    public boolean reloadData() throws Exception {
        beautyInfoMap = BeautyBussiness.getBeautyInfoMap();
        return true;
    }

    @Override
    public boolean stop() {
        return false;
    }

    public static Map<Integer, BeautyInfo> getBeautyInfoMap() {
        return beautyInfoMap;
    }

    public static BeautyInfo getBeautyInfo(int beautyId){
        return beautyInfoMap.get(beautyId);
    }
}
